<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/9/9
  Time: 10:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="/htdc/scripts/jquery/jquery-1.7.1.js"></script>
    <link href="/htdc/style/authority/basic_layout.css" rel="stylesheet" type="text/css">
    <link href="/htdc/style/authority/common_style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/htdc/scripts/authority/commonAll.js"></script>
    <script type="text/javascript" src="/htdc/scripts/fancybox/jquery.fancybox-1.3.4.js"></script>
    <script type="text/javascript" src="/htdc/scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
    <link rel="stylesheet" type="text/css" href="/htdc/style/authority/jquery.fancybox-1.3.4.css" media="screen"></link>
    <script type="text/javascript" src="/htdc/scripts/artDialog/artDialog.js?skin=default"></script>
    <title>项目列表</title>
    <script type="text/javascript">
        $(document).ready(function(){
            /** 新增   **/
            $("#addBtn").fancybox({
                'href'  : '/htdc/project/toAddProject',
                'width' : 733,
                'height' : 530,
                'type' : 'iframe',
                'hideOnOverlayClick' : false,
                'showCloseButton' : false,
                'onClosed' : function() {
                    window.location.href = '/htdc/count/getProject?cid=0';
                }
            });
            /**查看   **/
            $("a.edit").fancybox({
                'width' : 733,
                'height' : 530,
                'type' : 'iframe',
                'hideOnOverlayClick' : false,
                'showCloseButton' : false,
                'onClosed' : function() {
                    window.location.href = '/htdc/count/getProject?cid=0';
                }
            });


            /*
             * 取消
             */
            $("#cancelbutton").click(function() {
                /**  关闭弹出iframe  **/
                window.parent.$.fancybox.close();
            });

            var result = 'null';
            if(result =='success'){
                /**  关闭弹出iframe  **/
                window.parent.$.fancybox.close();
            }
        });
        /** 用户角色   **/
        var userRole = '';


        /** Excel导出  **/
        function exportExcel(){
            if( confirm('您确定要导出吗？') ){
                var fyXqCode = $("#fyXq").val();
                var fyXqName = $('#fyXq option:selected').text();
//	 		alert(fyXqCode);
                if(fyXqCode=="" || fyXqCode==null){
                    $("#fyXqName").val("");
                }else{
//	 			alert(fyXqCode);
                    $("#fyXqName").val(fyXqName);
                }
                $("#submitForm").attr("action", "/xngzf/archives/exportExcelFangyuan.action").submit();
            }
        }



        /** 普通跳转 **/
        function jumpNormalPage(page){
            $("#submitForm").attr("action", "house_list.html?page=" + page).submit();
        }


    </script>
    <style>
        .alt td{ background:black !important;}
    </style>
</head>
<body>
<form id="submitForm" name="submitForm" action="" method="post">
    <input type="hidden" name="allIDCheck" value="" id="allIDCheck"/>
    <input type="hidden" name="fangyuanEntity.fyXqName" value="" id="fyXqName"/>
    <div id="container">
        <div class="ui_content">
            <div class="ui_text_indent">
                <div id="box_border">
                    <div id="box_top">搜索</div>
                    <div id="box_center">
                            分公司：
                            <select name="cid" id="cid" class="ui_select01" onchange="change();">
                                <option value="0" class="pr">全部</option>
                                <c:forEach items="${companies}" var="company">
                                    <option value="${company.cid}" class="pr">${company.cname}</option>
                                </c:forEach>
                            </select>
                        <input style="vertical-align: middle" type="button" value="新增" class="ui_input_btn01" id="addBtn" />
                    </div>
                </div>
            </div>
        </div>
        <div class="ui_content">
            <div class="ui_tb">
                <table class="table" cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                    <tr>
                        </th>
                        <th>项目名称</th>
                        <th>地址</th>
                        <th>可租面积</th>
                        <th>实际面积</th>
                        <th>当前租金总额</th>
                        <th>实际租金总额</th>
                        <th>收缴率</th>
                        <th>操作</th>
                    </tr>
                     <form id="form" action="/htdc/count/getProject">
                        <c:forEach items="${project}" var="project">
                            <tr>
                                <td>${project.pname}</td>
                                <td>${project.address}</td>
                                <td>${project.totalRealArea}</td>
                                <td>${project.totalRealRentArea}</td>
                                <td>${project.pTotalMoney}</td>
                                <td>${project.pTotalRealMoeny}</td>
                                <td>${(project.pTotalMoney/project.pTotalRealMoeny)*100}%</td>
                                <td>
                                    <a href="/htdc/count/getData?pid=${project.pid}" class="edit" >查看</a>

                                    <a href="/htdc/project/getProject?pid=${project.pid}" class="edit" >编辑</a>
                                </td>
                            </tr>
                        </form>
                    </c:forEach>
                </table>
            </div>

        </div>
    </div>
</form>
<script>
    function change() {
        var data = $("#cid").val();
        if(data==undefined){
            data=0;
        }
        if(data==null){
            data=0;

        }

        window.location.href = '/htdc/count/getProject?cid='+data;
    }

</script>
</body>
</html>
